<h1>Team for <%= h @project.title %></h1>

<% form_tag  project_team_assign_path, :method => :put do %>
	<%= hidden_field 'project_id', @project.id %>
	<% for user in @users %>
		<%= check_box_tag 'user_ids[]', user.id, (true if @project.users.select{| u | u.id == user.id}.first) %>
		<%=h user.name %> (<%=h user.login %>) <br />
	<% end %>
	<%= submit_tag "Assgin to project" %> 
<% end %>
<%= link_to "Back", @project %>
<br />